/**
 * Ting Wang 2008
 *
 * $Id$
 */
package bpel2.abstractbpel.impl;

import bpel2.abstractbpel.AbstractBPELFactory;
import bpel2.abstractbpel.AbstractBPELPackage;
import bpel2.abstractbpel.Activity;
import bpel2.abstractbpel.ActivityContainer;
import bpel2.abstractbpel.Assign;
import bpel2.abstractbpel.BPELVariableNameMember1;
import bpel2.abstractbpel.BooleanExpr;
import bpel2.abstractbpel.Branches;
import bpel2.abstractbpel.Catch;
import bpel2.abstractbpel.Compensate;
import bpel2.abstractbpel.CompensateScope;
import bpel2.abstractbpel.CompletionCondition;
import bpel2.abstractbpel.Condition;
import bpel2.abstractbpel.Copy;
import bpel2.abstractbpel.Correlation;
import bpel2.abstractbpel.CorrelationSet;
import bpel2.abstractbpel.CorrelationSets;
import bpel2.abstractbpel.CorrelationWithPattern;
import bpel2.abstractbpel.Correlations;
import bpel2.abstractbpel.CorrelationsWithPattern;
import bpel2.abstractbpel.DeadlineExpr;
import bpel2.abstractbpel.DocumentRoot;
import bpel2.abstractbpel.Documentation;
import bpel2.abstractbpel.DurationExpr;
import bpel2.abstractbpel.Elseif;
import bpel2.abstractbpel.Empty;
import bpel2.abstractbpel.EventHandlers;
import bpel2.abstractbpel.Exit;
import bpel2.abstractbpel.Expression;
import bpel2.abstractbpel.ExtensibleElements;
import bpel2.abstractbpel.Extension;
import bpel2.abstractbpel.ExtensionActivity;
import bpel2.abstractbpel.ExtensionAssignOperation;
import bpel2.abstractbpel.Extensions;
import bpel2.abstractbpel.FaultHandlers;
import bpel2.abstractbpel.Flow;
import bpel2.abstractbpel.ForEach;
import bpel2.abstractbpel.From;
import bpel2.abstractbpel.FromPart;
import bpel2.abstractbpel.FromParts;
import bpel2.abstractbpel.If;
import bpel2.abstractbpel.Import;
import bpel2.abstractbpel.Initiate;
import bpel2.abstractbpel.Invoke;
import bpel2.abstractbpel.Link;
import bpel2.abstractbpel.Links;
import bpel2.abstractbpel.Literal;
import bpel2.abstractbpel.MessageExchange;
import bpel2.abstractbpel.MessageExchanges;
import bpel2.abstractbpel.OnAlarmEvent;
import bpel2.abstractbpel.OnAlarmPick;
import bpel2.abstractbpel.OnEvent;
import bpel2.abstractbpel.OnMessage;
import bpel2.abstractbpel.OnMsgCommon;
import bpel2.abstractbpel.PartnerLink;
import bpel2.abstractbpel.PartnerLinks;
import bpel2.abstractbpel.Pattern;
import bpel2.abstractbpel.Pick;
import bpel2.abstractbpel.Query;
import bpel2.abstractbpel.Receive;
import bpel2.abstractbpel.RepeatUntil;
import bpel2.abstractbpel.Reply;
import bpel2.abstractbpel.Rethrow;
import bpel2.abstractbpel.Roles;
import bpel2.abstractbpel.Scope;
import bpel2.abstractbpel.Sequence;
import bpel2.abstractbpel.Source;
import bpel2.abstractbpel.Sources;
import bpel2.abstractbpel.TOpaqueActivity;
import bpel2.abstractbpel.TOpaqueBoolean;
import bpel2.abstractbpel.TOpaqueStr;
import bpel2.abstractbpel.Target;
import bpel2.abstractbpel.Targets;
import bpel2.abstractbpel.Throw;
import bpel2.abstractbpel.To;
import bpel2.abstractbpel.ToPart;
import bpel2.abstractbpel.ToParts;
import bpel2.abstractbpel.Validate;
import bpel2.abstractbpel.Variable;
import bpel2.abstractbpel.Variables;
import bpel2.abstractbpel.Wait;
import bpel2.abstractbpel.While;

import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;

import org.eclipse.emf.ecore.impl.EFactoryImpl;

import org.eclipse.emf.ecore.plugin.EcorePlugin;

import org.eclipse.emf.ecore.util.Diagnostician;

import org.eclipse.emf.ecore.xml.type.XMLTypeFactory;
import org.eclipse.emf.ecore.xml.type.XMLTypePackage;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Factory</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class AbstractBPELFactoryImpl extends EFactoryImpl implements AbstractBPELFactory {
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static final String copyright = "Ting Wang 2008";

	/**
	 * Creates the default factory implementation.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static AbstractBPELFactory init() {
		try {
			AbstractBPELFactory theAbstractBPELFactory = (AbstractBPELFactory)EPackage.Registry.INSTANCE.getEFactory("http://docs.oasis-open.org/wsbpel/2.0/process/abstract"); 
			if (theAbstractBPELFactory != null) {
				return theAbstractBPELFactory;
			}
		}
		catch (Exception exception) {
			EcorePlugin.INSTANCE.log(exception);
		}
		return new AbstractBPELFactoryImpl();
	}

	/**
	 * Creates an instance of the factory.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public AbstractBPELFactoryImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public EObject create(EClass eClass) {
		switch (eClass.getClassifierID()) {
			case AbstractBPELPackage.DOCUMENT_ROOT: return createDocumentRoot();
			case AbstractBPELPackage.ACTIVITY: return createActivity();
			case AbstractBPELPackage.ACTIVITY_CONTAINER: return createActivityContainer();
			case AbstractBPELPackage.ASSIGN: return createAssign();
			case AbstractBPELPackage.BOOLEAN_EXPR: return createBooleanExpr();
			case AbstractBPELPackage.BRANCHES: return createBranches();
			case AbstractBPELPackage.CATCH: return createCatch();
			case AbstractBPELPackage.COMPENSATE: return createCompensate();
			case AbstractBPELPackage.COMPENSATE_SCOPE: return createCompensateScope();
			case AbstractBPELPackage.COMPLETION_CONDITION: return createCompletionCondition();
			case AbstractBPELPackage.CONDITION: return createCondition();
			case AbstractBPELPackage.COPY: return createCopy();
			case AbstractBPELPackage.CORRELATION: return createCorrelation();
			case AbstractBPELPackage.CORRELATIONS: return createCorrelations();
			case AbstractBPELPackage.CORRELATION_SET: return createCorrelationSet();
			case AbstractBPELPackage.CORRELATION_SETS: return createCorrelationSets();
			case AbstractBPELPackage.CORRELATIONS_WITH_PATTERN: return createCorrelationsWithPattern();
			case AbstractBPELPackage.CORRELATION_WITH_PATTERN: return createCorrelationWithPattern();
			case AbstractBPELPackage.DEADLINE_EXPR: return createDeadlineExpr();
			case AbstractBPELPackage.DOCUMENTATION: return createDocumentation();
			case AbstractBPELPackage.DURATION_EXPR: return createDurationExpr();
			case AbstractBPELPackage.ELSEIF: return createElseif();
			case AbstractBPELPackage.EMPTY: return createEmpty();
			case AbstractBPELPackage.EVENT_HANDLERS: return createEventHandlers();
			case AbstractBPELPackage.EXIT: return createExit();
			case AbstractBPELPackage.EXPRESSION: return createExpression();
			case AbstractBPELPackage.EXTENSIBLE_ELEMENTS: return createExtensibleElements();
			case AbstractBPELPackage.EXTENSION: return createExtension();
			case AbstractBPELPackage.EXTENSION_ACTIVITY: return createExtensionActivity();
			case AbstractBPELPackage.EXTENSION_ASSIGN_OPERATION: return createExtensionAssignOperation();
			case AbstractBPELPackage.EXTENSIONS: return createExtensions();
			case AbstractBPELPackage.FAULT_HANDLERS: return createFaultHandlers();
			case AbstractBPELPackage.FLOW: return createFlow();
			case AbstractBPELPackage.FOR_EACH: return createForEach();
			case AbstractBPELPackage.FROM: return createFrom();
			case AbstractBPELPackage.FROM_PART: return createFromPart();
			case AbstractBPELPackage.FROM_PARTS: return createFromParts();
			case AbstractBPELPackage.IF: return createIf();
			case AbstractBPELPackage.IMPORT: return createImport();
			case AbstractBPELPackage.INVOKE: return createInvoke();
			case AbstractBPELPackage.LINK: return createLink();
			case AbstractBPELPackage.LINKS: return createLinks();
			case AbstractBPELPackage.LITERAL: return createLiteral();
			case AbstractBPELPackage.MESSAGE_EXCHANGE: return createMessageExchange();
			case AbstractBPELPackage.MESSAGE_EXCHANGES: return createMessageExchanges();
			case AbstractBPELPackage.ON_ALARM_EVENT: return createOnAlarmEvent();
			case AbstractBPELPackage.ON_ALARM_PICK: return createOnAlarmPick();
			case AbstractBPELPackage.ON_EVENT: return createOnEvent();
			case AbstractBPELPackage.ON_MESSAGE: return createOnMessage();
			case AbstractBPELPackage.ON_MSG_COMMON: return createOnMsgCommon();
			case AbstractBPELPackage.TOPAQUE_ACTIVITY: return createTOpaqueActivity();
			case AbstractBPELPackage.PARTNER_LINK: return createPartnerLink();
			case AbstractBPELPackage.PARTNER_LINKS: return createPartnerLinks();
			case AbstractBPELPackage.PICK: return createPick();
			case AbstractBPELPackage.PROCESS: return createProcess();
			case AbstractBPELPackage.QUERY: return createQuery();
			case AbstractBPELPackage.RECEIVE: return createReceive();
			case AbstractBPELPackage.REPEAT_UNTIL: return createRepeatUntil();
			case AbstractBPELPackage.REPLY: return createReply();
			case AbstractBPELPackage.RETHROW: return createRethrow();
			case AbstractBPELPackage.SCOPE: return createScope();
			case AbstractBPELPackage.SEQUENCE: return createSequence();
			case AbstractBPELPackage.SOURCE: return createSource();
			case AbstractBPELPackage.SOURCES: return createSources();
			case AbstractBPELPackage.TARGET: return createTarget();
			case AbstractBPELPackage.TARGETS: return createTargets();
			case AbstractBPELPackage.THROW: return createThrow();
			case AbstractBPELPackage.TO: return createTo();
			case AbstractBPELPackage.TO_PART: return createToPart();
			case AbstractBPELPackage.TO_PARTS: return createToParts();
			case AbstractBPELPackage.VALIDATE: return createValidate();
			case AbstractBPELPackage.VARIABLE: return createVariable();
			case AbstractBPELPackage.VARIABLES: return createVariables();
			case AbstractBPELPackage.WAIT: return createWait();
			case AbstractBPELPackage.WHILE: return createWhile();
			default:
				throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
		}
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object createFromString(EDataType eDataType, String initialValue) {
		switch (eDataType.getClassifierID()) {
			case AbstractBPELPackage.BPEL_VARIABLE_NAME_MEMBER1:
				return createBPELVariableNameMember1FromString(eDataType, initialValue);
			case AbstractBPELPackage.BOOLEAN:
				return createBooleanFromString(eDataType, initialValue);
			case AbstractBPELPackage.INITIATE:
				return createInitiateFromString(eDataType, initialValue);
			case AbstractBPELPackage.TOPAQUE_BOOLEAN:
				return createTOpaqueBooleanFromString(eDataType, initialValue);
			case AbstractBPELPackage.TOPAQUE_STR:
				return createTOpaqueStrFromString(eDataType, initialValue);
			case AbstractBPELPackage.PATTERN:
				return createPatternFromString(eDataType, initialValue);
			case AbstractBPELPackage.ROLES:
				return createRolesFromString(eDataType, initialValue);
			case AbstractBPELPackage.ANY_URI:
				return createAnyURIFromString(eDataType, initialValue);
			case AbstractBPELPackage.BPEL_VARIABLE_NAME:
				return createBPELVariableNameFromString(eDataType, initialValue);
			case AbstractBPELPackage.BPEL_VARIABLE_NAME_MEMBER0:
				return createBPELVariableNameMember0FromString(eDataType, initialValue);
			case AbstractBPELPackage.BPEL_VARIABLE_NAME_MEMBER1_OBJECT:
				return createBPELVariableNameMember1ObjectFromString(eDataType, initialValue);
			case AbstractBPELPackage.BPEL_VARIABLE_NAMES:
				return createBPELVariableNamesFromString(eDataType, initialValue);
			case AbstractBPELPackage.BPEL_VARIABLE_NAMES_BASE:
				return createBPELVariableNamesBaseFromString(eDataType, initialValue);
			case AbstractBPELPackage.NC_NAME:
				return createNCNameFromString(eDataType, initialValue);
			case AbstractBPELPackage.QNAME:
				return createQNameFromString(eDataType, initialValue);
			case AbstractBPELPackage.QNAMES:
				return createQNamesFromString(eDataType, initialValue);
			case AbstractBPELPackage.QNAMES_BASE:
				return createQNamesBaseFromString(eDataType, initialValue);
			case AbstractBPELPackage.BOOLEAN_OBJECT:
				return createBooleanObjectFromString(eDataType, initialValue);
			case AbstractBPELPackage.INITIATE_OBJECT:
				return createInitiateObjectFromString(eDataType, initialValue);
			case AbstractBPELPackage.TOPAQUE_BOOLEAN_OBJECT:
				return createTOpaqueBooleanObjectFromString(eDataType, initialValue);
			case AbstractBPELPackage.TOPAQUE_STR_OBJECT:
				return createTOpaqueStrObjectFromString(eDataType, initialValue);
			case AbstractBPELPackage.PATTERN_OBJECT:
				return createPatternObjectFromString(eDataType, initialValue);
			case AbstractBPELPackage.ROLES_OBJECT:
				return createRolesObjectFromString(eDataType, initialValue);
			default:
				throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
		}
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String convertToString(EDataType eDataType, Object instanceValue) {
		switch (eDataType.getClassifierID()) {
			case AbstractBPELPackage.BPEL_VARIABLE_NAME_MEMBER1:
				return convertBPELVariableNameMember1ToString(eDataType, instanceValue);
			case AbstractBPELPackage.BOOLEAN:
				return convertBooleanToString(eDataType, instanceValue);
			case AbstractBPELPackage.INITIATE:
				return convertInitiateToString(eDataType, instanceValue);
			case AbstractBPELPackage.TOPAQUE_BOOLEAN:
				return convertTOpaqueBooleanToString(eDataType, instanceValue);
			case AbstractBPELPackage.TOPAQUE_STR:
				return convertTOpaqueStrToString(eDataType, instanceValue);
			case AbstractBPELPackage.PATTERN:
				return convertPatternToString(eDataType, instanceValue);
			case AbstractBPELPackage.ROLES:
				return convertRolesToString(eDataType, instanceValue);
			case AbstractBPELPackage.ANY_URI:
				return convertAnyURIToString(eDataType, instanceValue);
			case AbstractBPELPackage.BPEL_VARIABLE_NAME:
				return convertBPELVariableNameToString(eDataType, instanceValue);
			case AbstractBPELPackage.BPEL_VARIABLE_NAME_MEMBER0:
				return convertBPELVariableNameMember0ToString(eDataType, instanceValue);
			case AbstractBPELPackage.BPEL_VARIABLE_NAME_MEMBER1_OBJECT:
				return convertBPELVariableNameMember1ObjectToString(eDataType, instanceValue);
			case AbstractBPELPackage.BPEL_VARIABLE_NAMES:
				return convertBPELVariableNamesToString(eDataType, instanceValue);
			case AbstractBPELPackage.BPEL_VARIABLE_NAMES_BASE:
				return convertBPELVariableNamesBaseToString(eDataType, instanceValue);
			case AbstractBPELPackage.NC_NAME:
				return convertNCNameToString(eDataType, instanceValue);
			case AbstractBPELPackage.QNAME:
				return convertQNameToString(eDataType, instanceValue);
			case AbstractBPELPackage.QNAMES:
				return convertQNamesToString(eDataType, instanceValue);
			case AbstractBPELPackage.QNAMES_BASE:
				return convertQNamesBaseToString(eDataType, instanceValue);
			case AbstractBPELPackage.BOOLEAN_OBJECT:
				return convertBooleanObjectToString(eDataType, instanceValue);
			case AbstractBPELPackage.INITIATE_OBJECT:
				return convertInitiateObjectToString(eDataType, instanceValue);
			case AbstractBPELPackage.TOPAQUE_BOOLEAN_OBJECT:
				return convertTOpaqueBooleanObjectToString(eDataType, instanceValue);
			case AbstractBPELPackage.TOPAQUE_STR_OBJECT:
				return convertTOpaqueStrObjectToString(eDataType, instanceValue);
			case AbstractBPELPackage.PATTERN_OBJECT:
				return convertPatternObjectToString(eDataType, instanceValue);
			case AbstractBPELPackage.ROLES_OBJECT:
				return convertRolesObjectToString(eDataType, instanceValue);
			default:
				throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
		}
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public DocumentRoot createDocumentRoot() {
		DocumentRootImpl documentRoot = new DocumentRootImpl();
		return documentRoot;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Activity createActivity() {
		ActivityImpl activity = new ActivityImpl();
		return activity;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ActivityContainer createActivityContainer() {
		ActivityContainerImpl activityContainer = new ActivityContainerImpl();
		return activityContainer;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Assign createAssign() {
		AssignImpl assign = new AssignImpl();
		return assign;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public BooleanExpr createBooleanExpr() {
		BooleanExprImpl booleanExpr = new BooleanExprImpl();
		return booleanExpr;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Branches createBranches() {
		BranchesImpl branches = new BranchesImpl();
		return branches;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Catch createCatch() {
		CatchImpl catch_ = new CatchImpl();
		return catch_;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Compensate createCompensate() {
		CompensateImpl compensate = new CompensateImpl();
		return compensate;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public CompensateScope createCompensateScope() {
		CompensateScopeImpl compensateScope = new CompensateScopeImpl();
		return compensateScope;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public CompletionCondition createCompletionCondition() {
		CompletionConditionImpl completionCondition = new CompletionConditionImpl();
		return completionCondition;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Condition createCondition() {
		ConditionImpl condition = new ConditionImpl();
		return condition;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Copy createCopy() {
		CopyImpl copy = new CopyImpl();
		return copy;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Correlation createCorrelation() {
		CorrelationImpl correlation = new CorrelationImpl();
		return correlation;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Correlations createCorrelations() {
		CorrelationsImpl correlations = new CorrelationsImpl();
		return correlations;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public CorrelationSet createCorrelationSet() {
		CorrelationSetImpl correlationSet = new CorrelationSetImpl();
		return correlationSet;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public CorrelationSets createCorrelationSets() {
		CorrelationSetsImpl correlationSets = new CorrelationSetsImpl();
		return correlationSets;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public CorrelationsWithPattern createCorrelationsWithPattern() {
		CorrelationsWithPatternImpl correlationsWithPattern = new CorrelationsWithPatternImpl();
		return correlationsWithPattern;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public CorrelationWithPattern createCorrelationWithPattern() {
		CorrelationWithPatternImpl correlationWithPattern = new CorrelationWithPatternImpl();
		return correlationWithPattern;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public DeadlineExpr createDeadlineExpr() {
		DeadlineExprImpl deadlineExpr = new DeadlineExprImpl();
		return deadlineExpr;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Documentation createDocumentation() {
		DocumentationImpl documentation = new DocumentationImpl();
		return documentation;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public DurationExpr createDurationExpr() {
		DurationExprImpl durationExpr = new DurationExprImpl();
		return durationExpr;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Elseif createElseif() {
		ElseifImpl elseif = new ElseifImpl();
		return elseif;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Empty createEmpty() {
		EmptyImpl empty = new EmptyImpl();
		return empty;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EventHandlers createEventHandlers() {
		EventHandlersImpl eventHandlers = new EventHandlersImpl();
		return eventHandlers;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Exit createExit() {
		ExitImpl exit = new ExitImpl();
		return exit;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Expression createExpression() {
		ExpressionImpl expression = new ExpressionImpl();
		return expression;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ExtensibleElements createExtensibleElements() {
		ExtensibleElementsImpl extensibleElements = new ExtensibleElementsImpl();
		return extensibleElements;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Extension createExtension() {
		ExtensionImpl extension = new ExtensionImpl();
		return extension;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ExtensionActivity createExtensionActivity() {
		ExtensionActivityImpl extensionActivity = new ExtensionActivityImpl();
		return extensionActivity;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ExtensionAssignOperation createExtensionAssignOperation() {
		ExtensionAssignOperationImpl extensionAssignOperation = new ExtensionAssignOperationImpl();
		return extensionAssignOperation;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Extensions createExtensions() {
		ExtensionsImpl extensions = new ExtensionsImpl();
		return extensions;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public FaultHandlers createFaultHandlers() {
		FaultHandlersImpl faultHandlers = new FaultHandlersImpl();
		return faultHandlers;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Flow createFlow() {
		FlowImpl flow = new FlowImpl();
		return flow;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ForEach createForEach() {
		ForEachImpl forEach = new ForEachImpl();
		return forEach;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public From createFrom() {
		FromImpl from = new FromImpl();
		return from;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public FromPart createFromPart() {
		FromPartImpl fromPart = new FromPartImpl();
		return fromPart;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public FromParts createFromParts() {
		FromPartsImpl fromParts = new FromPartsImpl();
		return fromParts;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public If createIf() {
		IfImpl if_ = new IfImpl();
		return if_;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Import createImport() {
		ImportImpl import_ = new ImportImpl();
		return import_;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Invoke createInvoke() {
		InvokeImpl invoke = new InvokeImpl();
		return invoke;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Link createLink() {
		LinkImpl link = new LinkImpl();
		return link;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Links createLinks() {
		LinksImpl links = new LinksImpl();
		return links;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Literal createLiteral() {
		LiteralImpl literal = new LiteralImpl();
		return literal;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public MessageExchange createMessageExchange() {
		MessageExchangeImpl messageExchange = new MessageExchangeImpl();
		return messageExchange;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public MessageExchanges createMessageExchanges() {
		MessageExchangesImpl messageExchanges = new MessageExchangesImpl();
		return messageExchanges;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public OnAlarmEvent createOnAlarmEvent() {
		OnAlarmEventImpl onAlarmEvent = new OnAlarmEventImpl();
		return onAlarmEvent;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public OnAlarmPick createOnAlarmPick() {
		OnAlarmPickImpl onAlarmPick = new OnAlarmPickImpl();
		return onAlarmPick;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public OnEvent createOnEvent() {
		OnEventImpl onEvent = new OnEventImpl();
		return onEvent;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public OnMessage createOnMessage() {
		OnMessageImpl onMessage = new OnMessageImpl();
		return onMessage;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public OnMsgCommon createOnMsgCommon() {
		OnMsgCommonImpl onMsgCommon = new OnMsgCommonImpl();
		return onMsgCommon;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public TOpaqueActivity createTOpaqueActivity() {
		TOpaqueActivityImpl tOpaqueActivity = new TOpaqueActivityImpl();
		return tOpaqueActivity;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PartnerLink createPartnerLink() {
		PartnerLinkImpl partnerLink = new PartnerLinkImpl();
		return partnerLink;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PartnerLinks createPartnerLinks() {
		PartnerLinksImpl partnerLinks = new PartnerLinksImpl();
		return partnerLinks;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Pick createPick() {
		PickImpl pick = new PickImpl();
		return pick;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public bpel2.abstractbpel.Process createProcess() {
		ProcessImpl process = new ProcessImpl();
		return process;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Query createQuery() {
		QueryImpl query = new QueryImpl();
		return query;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Receive createReceive() {
		ReceiveImpl receive = new ReceiveImpl();
		return receive;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public RepeatUntil createRepeatUntil() {
		RepeatUntilImpl repeatUntil = new RepeatUntilImpl();
		return repeatUntil;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Reply createReply() {
		ReplyImpl reply = new ReplyImpl();
		return reply;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Rethrow createRethrow() {
		RethrowImpl rethrow = new RethrowImpl();
		return rethrow;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Scope createScope() {
		ScopeImpl scope = new ScopeImpl();
		return scope;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Sequence createSequence() {
		SequenceImpl sequence = new SequenceImpl();
		return sequence;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Source createSource() {
		SourceImpl source = new SourceImpl();
		return source;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Sources createSources() {
		SourcesImpl sources = new SourcesImpl();
		return sources;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Target createTarget() {
		TargetImpl target = new TargetImpl();
		return target;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Targets createTargets() {
		TargetsImpl targets = new TargetsImpl();
		return targets;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Throw createThrow() {
		ThrowImpl throw_ = new ThrowImpl();
		return throw_;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public To createTo() {
		ToImpl to = new ToImpl();
		return to;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ToPart createToPart() {
		ToPartImpl toPart = new ToPartImpl();
		return toPart;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ToParts createToParts() {
		ToPartsImpl toParts = new ToPartsImpl();
		return toParts;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Validate createValidate() {
		ValidateImpl validate = new ValidateImpl();
		return validate;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Variable createVariable() {
		VariableImpl variable = new VariableImpl();
		return variable;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Variables createVariables() {
		VariablesImpl variables = new VariablesImpl();
		return variables;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Wait createWait() {
		WaitImpl wait = new WaitImpl();
		return wait;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public While createWhile() {
		WhileImpl while_ = new WhileImpl();
		return while_;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public BPELVariableNameMember1 createBPELVariableNameMember1FromString(EDataType eDataType, String initialValue) {
		BPELVariableNameMember1 result = BPELVariableNameMember1.get(initialValue);
		if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
		return result;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String convertBPELVariableNameMember1ToString(EDataType eDataType, Object instanceValue) {
		return instanceValue == null ? null : instanceValue.toString();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public bpel2.abstractbpel.Boolean createBooleanFromString(EDataType eDataType, String initialValue) {
		bpel2.abstractbpel.Boolean result = bpel2.abstractbpel.Boolean.get(initialValue);
		if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
		return result;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String convertBooleanToString(EDataType eDataType, Object instanceValue) {
		return instanceValue == null ? null : instanceValue.toString();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Initiate createInitiateFromString(EDataType eDataType, String initialValue) {
		Initiate result = Initiate.get(initialValue);
		if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
		return result;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String convertInitiateToString(EDataType eDataType, Object instanceValue) {
		return instanceValue == null ? null : instanceValue.toString();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public TOpaqueBoolean createTOpaqueBooleanFromString(EDataType eDataType, String initialValue) {
		TOpaqueBoolean result = TOpaqueBoolean.get(initialValue);
		if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
		return result;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String convertTOpaqueBooleanToString(EDataType eDataType, Object instanceValue) {
		return instanceValue == null ? null : instanceValue.toString();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public TOpaqueStr createTOpaqueStrFromString(EDataType eDataType, String initialValue) {
		TOpaqueStr result = TOpaqueStr.get(initialValue);
		if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
		return result;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String convertTOpaqueStrToString(EDataType eDataType, Object instanceValue) {
		return instanceValue == null ? null : instanceValue.toString();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Pattern createPatternFromString(EDataType eDataType, String initialValue) {
		Pattern result = Pattern.get(initialValue);
		if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
		return result;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String convertPatternToString(EDataType eDataType, Object instanceValue) {
		return instanceValue == null ? null : instanceValue.toString();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Roles createRolesFromString(EDataType eDataType, String initialValue) {
		Roles result = Roles.get(initialValue);
		if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
		return result;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String convertRolesToString(EDataType eDataType, Object instanceValue) {
		return instanceValue == null ? null : instanceValue.toString();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Object createAnyURIFromString(EDataType eDataType, String initialValue) {
		if (initialValue == null) return null;
		Object result = null;
		RuntimeException exception = null;
		try {
			result = XMLTypeFactory.eINSTANCE.createFromString(XMLTypePackage.Literals.ANY_URI, initialValue);
			if (result != null && Diagnostician.INSTANCE.validate(eDataType, result, null, null)) {
				return result;
			}
		}
		catch (RuntimeException e) {
			exception = e;
		}
		try {
			result = createTOpaqueStrFromString(AbstractBPELPackage.eINSTANCE.getTOpaqueStr(), initialValue);
			if (result != null && Diagnostician.INSTANCE.validate(eDataType, result, null, null)) {
				return result;
			}
		}
		catch (RuntimeException e) {
			exception = e;
		}
		if (result != null || exception == null) return result;
    
		throw exception;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String convertAnyURIToString(EDataType eDataType, Object instanceValue) {
		if (instanceValue == null) return null;
		if (XMLTypePackage.Literals.ANY_URI.isInstance(instanceValue)) {
			try {
				String value = XMLTypeFactory.eINSTANCE.convertToString(XMLTypePackage.Literals.ANY_URI, instanceValue);
				if (value != null) return value;
			}
			catch (Exception e) {
				// Keep trying other member types until all have failed.
			}
		}
		if (AbstractBPELPackage.eINSTANCE.getTOpaqueStr().isInstance(instanceValue)) {
			try {
				String value = convertTOpaqueStrToString(AbstractBPELPackage.eINSTANCE.getTOpaqueStr(), instanceValue);
				if (value != null) return value;
			}
			catch (Exception e) {
				// Keep trying other member types until all have failed.
			}
		}
		throw new IllegalArgumentException("Invalid value: '"+instanceValue+"' for datatype :"+eDataType.getName());
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Object createBPELVariableNameFromString(EDataType eDataType, String initialValue) {
		if (initialValue == null) return null;
		Object result = null;
		RuntimeException exception = null;
		try {
			result = createBPELVariableNameMember0FromString(AbstractBPELPackage.eINSTANCE.getBPELVariableNameMember0(), initialValue);
			if (result != null && Diagnostician.INSTANCE.validate(eDataType, result, null, null)) {
				return result;
			}
		}
		catch (RuntimeException e) {
			exception = e;
		}
		try {
			result = createBPELVariableNameMember1FromString(AbstractBPELPackage.eINSTANCE.getBPELVariableNameMember1(), initialValue);
			if (result != null && Diagnostician.INSTANCE.validate(eDataType, result, null, null)) {
				return result;
			}
		}
		catch (RuntimeException e) {
			exception = e;
		}
		if (result != null || exception == null) return result;
    
		throw exception;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String convertBPELVariableNameToString(EDataType eDataType, Object instanceValue) {
		if (instanceValue == null) return null;
		if (AbstractBPELPackage.eINSTANCE.getBPELVariableNameMember0().isInstance(instanceValue)) {
			try {
				String value = convertBPELVariableNameMember0ToString(AbstractBPELPackage.eINSTANCE.getBPELVariableNameMember0(), instanceValue);
				if (value != null) return value;
			}
			catch (Exception e) {
				// Keep trying other member types until all have failed.
			}
		}
		if (AbstractBPELPackage.eINSTANCE.getBPELVariableNameMember1().isInstance(instanceValue)) {
			try {
				String value = convertBPELVariableNameMember1ToString(AbstractBPELPackage.eINSTANCE.getBPELVariableNameMember1(), instanceValue);
				if (value != null) return value;
			}
			catch (Exception e) {
				// Keep trying other member types until all have failed.
			}
		}
		throw new IllegalArgumentException("Invalid value: '"+instanceValue+"' for datatype :"+eDataType.getName());
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String createBPELVariableNameMember0FromString(EDataType eDataType, String initialValue) {
		return (String)XMLTypeFactory.eINSTANCE.createFromString(XMLTypePackage.Literals.NC_NAME, initialValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String convertBPELVariableNameMember0ToString(EDataType eDataType, Object instanceValue) {
		return XMLTypeFactory.eINSTANCE.convertToString(XMLTypePackage.Literals.NC_NAME, instanceValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public BPELVariableNameMember1 createBPELVariableNameMember1ObjectFromString(EDataType eDataType, String initialValue) {
		return createBPELVariableNameMember1FromString(AbstractBPELPackage.eINSTANCE.getBPELVariableNameMember1(), initialValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String convertBPELVariableNameMember1ObjectToString(EDataType eDataType, Object instanceValue) {
		return convertBPELVariableNameMember1ToString(AbstractBPELPackage.eINSTANCE.getBPELVariableNameMember1(), instanceValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public List<Object> createBPELVariableNamesFromString(EDataType eDataType, String initialValue) {
		return createBPELVariableNamesBaseFromString(AbstractBPELPackage.eINSTANCE.getBPELVariableNamesBase(), initialValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String convertBPELVariableNamesToString(EDataType eDataType, Object instanceValue) {
		return convertBPELVariableNamesBaseToString(AbstractBPELPackage.eINSTANCE.getBPELVariableNamesBase(), instanceValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public List<Object> createBPELVariableNamesBaseFromString(EDataType eDataType, String initialValue) {
		if (initialValue == null) return null;
		List<Object> result = new ArrayList<Object>();
		for (StringTokenizer stringTokenizer = new StringTokenizer(initialValue); stringTokenizer.hasMoreTokens(); ) {
			String item = stringTokenizer.nextToken();
			result.add(createBPELVariableNameFromString(AbstractBPELPackage.eINSTANCE.getBPELVariableName(), item));
		}
		return result;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String convertBPELVariableNamesBaseToString(EDataType eDataType, Object instanceValue) {
		if (instanceValue == null) return null;
		List<?> list = (List<?>)instanceValue;
		if (list.isEmpty()) return "";
		StringBuffer result = new StringBuffer();
		for (Object item : list) {
			result.append(convertBPELVariableNameToString(AbstractBPELPackage.eINSTANCE.getBPELVariableName(), item));
			result.append(' ');
		}
		return result.substring(0, result.length() - 1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Object createNCNameFromString(EDataType eDataType, String initialValue) {
		if (initialValue == null) return null;
		Object result = null;
		RuntimeException exception = null;
		try {
			result = XMLTypeFactory.eINSTANCE.createFromString(XMLTypePackage.Literals.NC_NAME, initialValue);
			if (result != null && Diagnostician.INSTANCE.validate(eDataType, result, null, null)) {
				return result;
			}
		}
		catch (RuntimeException e) {
			exception = e;
		}
		try {
			result = createTOpaqueStrFromString(AbstractBPELPackage.eINSTANCE.getTOpaqueStr(), initialValue);
			if (result != null && Diagnostician.INSTANCE.validate(eDataType, result, null, null)) {
				return result;
			}
		}
		catch (RuntimeException e) {
			exception = e;
		}
		if (result != null || exception == null) return result;
    
		throw exception;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String convertNCNameToString(EDataType eDataType, Object instanceValue) {
		if (instanceValue == null) return null;
		if (XMLTypePackage.Literals.NC_NAME.isInstance(instanceValue)) {
			try {
				String value = XMLTypeFactory.eINSTANCE.convertToString(XMLTypePackage.Literals.NC_NAME, instanceValue);
				if (value != null) return value;
			}
			catch (Exception e) {
				// Keep trying other member types until all have failed.
			}
		}
		if (AbstractBPELPackage.eINSTANCE.getTOpaqueStr().isInstance(instanceValue)) {
			try {
				String value = convertTOpaqueStrToString(AbstractBPELPackage.eINSTANCE.getTOpaqueStr(), instanceValue);
				if (value != null) return value;
			}
			catch (Exception e) {
				// Keep trying other member types until all have failed.
			}
		}
		throw new IllegalArgumentException("Invalid value: '"+instanceValue+"' for datatype :"+eDataType.getName());
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Object createQNameFromString(EDataType eDataType, String initialValue) {
		if (initialValue == null) return null;
		Object result = null;
		RuntimeException exception = null;
		try {
			result = XMLTypeFactory.eINSTANCE.createFromString(XMLTypePackage.Literals.QNAME, initialValue);
			if (result != null && Diagnostician.INSTANCE.validate(eDataType, result, null, null)) {
				return result;
			}
		}
		catch (RuntimeException e) {
			exception = e;
		}
		try {
			result = createTOpaqueStrFromString(AbstractBPELPackage.eINSTANCE.getTOpaqueStr(), initialValue);
			if (result != null && Diagnostician.INSTANCE.validate(eDataType, result, null, null)) {
				return result;
			}
		}
		catch (RuntimeException e) {
			exception = e;
		}
		if (result != null || exception == null) return result;
    
		throw exception;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String convertQNameToString(EDataType eDataType, Object instanceValue) {
		if (instanceValue == null) return null;
		if (XMLTypePackage.Literals.QNAME.isInstance(instanceValue)) {
			try {
				String value = XMLTypeFactory.eINSTANCE.convertToString(XMLTypePackage.Literals.QNAME, instanceValue);
				if (value != null) return value;
			}
			catch (Exception e) {
				// Keep trying other member types until all have failed.
			}
		}
		if (AbstractBPELPackage.eINSTANCE.getTOpaqueStr().isInstance(instanceValue)) {
			try {
				String value = convertTOpaqueStrToString(AbstractBPELPackage.eINSTANCE.getTOpaqueStr(), instanceValue);
				if (value != null) return value;
			}
			catch (Exception e) {
				// Keep trying other member types until all have failed.
			}
		}
		throw new IllegalArgumentException("Invalid value: '"+instanceValue+"' for datatype :"+eDataType.getName());
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public List<Object> createQNamesFromString(EDataType eDataType, String initialValue) {
		return createQNamesBaseFromString(AbstractBPELPackage.eINSTANCE.getQNamesBase(), initialValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String convertQNamesToString(EDataType eDataType, Object instanceValue) {
		return convertQNamesBaseToString(AbstractBPELPackage.eINSTANCE.getQNamesBase(), instanceValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public List<Object> createQNamesBaseFromString(EDataType eDataType, String initialValue) {
		if (initialValue == null) return null;
		List<Object> result = new ArrayList<Object>();
		for (StringTokenizer stringTokenizer = new StringTokenizer(initialValue); stringTokenizer.hasMoreTokens(); ) {
			String item = stringTokenizer.nextToken();
			result.add(createQNameFromString(AbstractBPELPackage.eINSTANCE.getQName(), item));
		}
		return result;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String convertQNamesBaseToString(EDataType eDataType, Object instanceValue) {
		if (instanceValue == null) return null;
		List<?> list = (List<?>)instanceValue;
		if (list.isEmpty()) return "";
		StringBuffer result = new StringBuffer();
		for (Object item : list) {
			result.append(convertQNameToString(AbstractBPELPackage.eINSTANCE.getQName(), item));
			result.append(' ');
		}
		return result.substring(0, result.length() - 1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public bpel2.abstractbpel.Boolean createBooleanObjectFromString(EDataType eDataType, String initialValue) {
		return createBooleanFromString(AbstractBPELPackage.eINSTANCE.getBoolean(), initialValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String convertBooleanObjectToString(EDataType eDataType, Object instanceValue) {
		return convertBooleanToString(AbstractBPELPackage.eINSTANCE.getBoolean(), instanceValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Initiate createInitiateObjectFromString(EDataType eDataType, String initialValue) {
		return createInitiateFromString(AbstractBPELPackage.eINSTANCE.getInitiate(), initialValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String convertInitiateObjectToString(EDataType eDataType, Object instanceValue) {
		return convertInitiateToString(AbstractBPELPackage.eINSTANCE.getInitiate(), instanceValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public TOpaqueBoolean createTOpaqueBooleanObjectFromString(EDataType eDataType, String initialValue) {
		return createTOpaqueBooleanFromString(AbstractBPELPackage.eINSTANCE.getTOpaqueBoolean(), initialValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String convertTOpaqueBooleanObjectToString(EDataType eDataType, Object instanceValue) {
		return convertTOpaqueBooleanToString(AbstractBPELPackage.eINSTANCE.getTOpaqueBoolean(), instanceValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public TOpaqueStr createTOpaqueStrObjectFromString(EDataType eDataType, String initialValue) {
		return createTOpaqueStrFromString(AbstractBPELPackage.eINSTANCE.getTOpaqueStr(), initialValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String convertTOpaqueStrObjectToString(EDataType eDataType, Object instanceValue) {
		return convertTOpaqueStrToString(AbstractBPELPackage.eINSTANCE.getTOpaqueStr(), instanceValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Pattern createPatternObjectFromString(EDataType eDataType, String initialValue) {
		return createPatternFromString(AbstractBPELPackage.eINSTANCE.getPattern(), initialValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String convertPatternObjectToString(EDataType eDataType, Object instanceValue) {
		return convertPatternToString(AbstractBPELPackage.eINSTANCE.getPattern(), instanceValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Roles createRolesObjectFromString(EDataType eDataType, String initialValue) {
		return createRolesFromString(AbstractBPELPackage.eINSTANCE.getRoles(), initialValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String convertRolesObjectToString(EDataType eDataType, Object instanceValue) {
		return convertRolesToString(AbstractBPELPackage.eINSTANCE.getRoles(), instanceValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public AbstractBPELPackage getAbstractBPELPackage() {
		return (AbstractBPELPackage)getEPackage();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @deprecated
	 * @generated
	 */
	@Deprecated
	public static AbstractBPELPackage getPackage() {
		return AbstractBPELPackage.eINSTANCE;
	}

} //AbstractBPELFactoryImpl
